import business
#   控制层：实现界面打印和菜单选择
def print_menu():
    while True:
        print('-----控制面板-----')
        print("1. 查看所有商品信息")
        print("2. 查找商品")
        print("3. 添加商品")
        print("4. 修改商品价格和折扣")
        print("5. 删除商品")
        print("6. 查看所有订单")
        print("7. 删除订单")
        print("8. 订单统计")
        print("9. 商品结算")
        choice = int(input('请输入要选择的操作:'))
        if choice == 1:
            business.show_products()
        elif choice == 2:
            business.get_product()
        elif choice == 3:
            business.add_product()
        elif choice == 4:
            business.mod_product()
        elif choice == 5:
            business.del_product()
        elif choice == 6:
            business.show_orders()
        elif choice == 7:
            business.del_order()
        elif choice == 8:
            business.count_orders()
        elif choice == 9:
            business.add_order()
            break
        else:
            print('输入有误，请重新选择')


if __name__ == '__main__':
    print_menu()
